package com.atXiao.video.mapper;

import com.atXiao.video.entity.Video;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author lixiaoxiao
 * @date: 2022/11/1
 */
@Mapper
public interface CollectionMapper {
    void addCollectionByUsername(@Param("username") String username, @Param("videoId") Integer videoId);

    void cancelCollectionByUsername(@Param("username") String username, @Param("videoId") Integer videoId);

    IPage<Video> getCollectionByUsername(Page<Video> page, @Param("username") String username);

    Integer isExisted(@Param("username") String username, @Param("videoId") Integer videoId);
}
